﻿#include "BufferDelayer.h"
#include "InterpolateFunction.h"

#ifdef USEJNI
#include "BufferDelayer_JNI.h"
using namespace yzrilyzr_dsp;
JNIEXPORT jdouble JNICALL Java_yzrilyzr_dsp_BufferDelayer_lagrangeDelay(JNIEnv*, jobject, jlong ringBufferPtr, jdouble index) {
	RingBuffer* ptr1 = reinterpret_cast<RingBuffer*>(ringBufferPtr);
	return BufferDelayer::lagrangeDelay(ptr1, index);
}
JNIEXPORT jdouble JNICALL Java_yzrilyzr_dsp_BufferDelayer_cubicSplineDelay(JNIEnv*, jobject, jlong ringBufferPtr, jdouble index) {
	RingBuffer* ptr1 = reinterpret_cast<RingBuffer*>(ringBufferPtr);
	return BufferDelayer::cubicSplineDelay(ptr1, index);
}
JNIEXPORT jdouble JNICALL Java_yzrilyzr_dsp_BufferDelayer_linearDelay(JNIEnv*, jobject, jlong ringBufferPtr, jdouble index) {
	RingBuffer* ptr1 = reinterpret_cast<RingBuffer*>(ringBufferPtr);
	return BufferDelayer::linearDelay(ptr1, index);
}
#endif